package com.example.vv.frameWork.mvp;

import com.example.vv.frameWork.base.BaseView;

public abstract class MvpPresenter<V extends BaseView,M> {
    private V view;
    public M model;

    public void attach(V view) {
        this.view = view;
    }

    public void detach() {
        this.view = null;
    }

    public V view() throws ViewISNullException {
        if (view == null) {
            throw new ViewISNullException();
        }
        return view;
    }

}
